package com.atguigu.gulimall.order.feign.fallback;

import com.atguigu.common.exception.BizCodeEnume;
import com.atguigu.common.utils.R;
import com.atguigu.gulimall.order.feign.ProductFeignService;
import lombok.extern.slf4j.Slf4j;
import org.springframework.stereotype.Component;

import java.math.BigDecimal;

@Slf4j
@Component
public class ProductFeignServiceFallback implements ProductFeignService {
    @Override
    public BigDecimal getPrice(String skuId) {
        return null;
    }

    @Override
    public R getSpuInfoBySkuId(Long skuId) {
        log.info("熔断方法调用");
        return R.error(BizCodeEnume.TO_MANY_REQUEST);
    }
}
